package com.bw.zcb.network.tool;

import com.bw.zcb.mvp.base.model.BaseEntity;
import com.bw.zcb.mvp.model.entity.ChannelEntity;
import com.bw.zcb.mvp.model.entity.FollowEntity;
import com.bw.zcb.mvp.model.entity.ImageBannerEntity;
import com.bw.zcb.mvp.model.entity.NewsEntity;
import com.bw.zcb.mvp.model.entity.RecommendEntity;
import com.bw.zcb.mvp.model.entity.ResponseUserEntity;
import com.bw.zcb.mvp.model.entity.TextBannerEntity;
import com.bw.zcb.mvp.model.entity.ToKenEntity;
import com.bw.zcb.mvp.model.entity.UploadEntity;
import com.bw.zcb.mvp.model.entity.UserFollowEntity;
import com.bw.zcb.mvp.model.entity.VideoNewsEntity;

import java.util.List;

import io.reactivex.Observable;
import okhttp3.MultipartBody;
import okhttp3.RequestBody;
import retrofit2.http.Body;
import retrofit2.http.Multipart;
import retrofit2.http.POST;
import retrofit2.http.Part;

public interface Api {
    //    String BaseUrl = "http://118.195.161.134:8088/";//生产环境地址
    String BaseUrl = "http://118.195.161.134:8066/";//测试环境地址
    String FileUrl = "http://118.195.161.134:8066/fileDownload?fileName=";

    @POST("sysToken/getToken")
    Observable<ToKenEntity> requestToken(@Body RequestBody body);

    @POST("sysUser/loginUser")
    Observable<ResponseUserEntity>requestLogin(@Body RequestBody body);

    @POST("sysUser/registerUser")
    Observable<ResponseUserEntity>requestRegister(@Body RequestBody body);


    @POST("sysUser/updateUser")
    Observable<BaseEntity>requestUpdateUser(@Body RequestBody body);

    @POST("sysNews/channelNews")
    Observable<NewsEntity>requestNews(@Body RequestBody body);
    @POST("sysChannel/userChannel")
    Observable<ChannelEntity>requestUserChannels(@Body RequestBody body);
    @POST("sysBanner/textBannerNews")
    Observable<TextBannerEntity>requestTextBanner();
    @POST("sysBanner/bannerNews")
    Observable<ImageBannerEntity>requestImageBanner();
    @POST("sysNews/hotNews")
    Observable<RecommendEntity>requestRecommendNews();
    @POST("sysNews/followNews")
    Observable<FollowEntity>requestFollowNews(@Body RequestBody body);
    @POST("sysFollow/selFollow")
    Observable<UserFollowEntity>requestUserFollow(@Body RequestBody body);

    @POST("sysNews/videoNews")
    Observable<VideoNewsEntity>requestVideoNews(@Body RequestBody body);

    @Multipart
    @POST("fileUpload")
    Observable<UploadEntity>requestUploadHead(@Part List<MultipartBody.Part> parts);


}
